Skip to content

Simple Javascript-Library to maintain OAuth2 implicit Grants

License

Notifications You must be signed in to change notification settings

quarxConnect/jOAuth2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

jOAuth2

Simple Javascript-Library to maintain OAuth2 implicit Grants

Usage

<script type="text/javascript">

  var authz = new jOAuth2 ({    
    client_id : 'id-of-public-client',
    authorization_endpoint : 'https://url-of-authz-endpoint/',
  });
  
  if (authz.authorize ()) {
    /* ... */
  }

</script>

authorize() may redirect the UA to the authorization-endpoint if there is no or only an invalid access-token available. Whenever possible it will try to check validity of access-tokens without any external API-Call by using the expires_in-attribute from the original grant. If expires_in is unavailable for any reason it may use Token-Introspection (RFC 7662) to check the validity of an access-token. Whenever the access-token is not needed anymore it may be removed and revoked (RFC 7009) using deauthorize().

Copyright & License

Copyright (C) 2017-2018 Bernd Holzmüller

Licensed under the MIT License. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

About

Simple Javascript-Library to maintain OAuth2 implicit Grants

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published