Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
#199 fix oauth2
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeleonard committed Oct 29, 2020
1 parent 129fab0 commit 10e1777
Showing 1 changed file with 22 additions and 48 deletions.
70 changes: 22 additions & 48 deletions admin/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,39 +244,6 @@ session {
}
```

#### OAUTH2 Example

```
oauth2 {
name: oauth2
clientId: "client-id"
clientSecret: "client-secret"
redirectUri: "http://localhost:9000/api/ssoLogin"
responseType: code
grantType: "authorization_code"
authorizationUrl: "https://github.com/login/oauth/authorize"
authorizationHeader: "token"
tokenUrl: "https://github.com/login/oauth/access_token"
userUrl: "https://api.github.com/user"
scope: ["user"]
}
sso {
autocreate: false
autoupdate: false
mapper: "simple"
attributes {
login: "login"
name: "name"
roles: "role"
}
defaultRoles: ["read", "write"]
defaultOrganization: "demo"
}
```



### 3.1. LDAP/AD
Expand Down Expand Up @@ -314,22 +281,29 @@ Authenticate the user using an external OAuth2 authenticator server. The configu
- userUrl (string) the url to get user information in OAuth2 server.
- scope (list of string) list of scope.

##### Example


Example:

oauth2 {
name: oauth2
clientId: "client-id"
clientSecret: "client-secret"
redirectUri: "http://localhost:9000/api/ssoLogin"
responseType: code
grantType: "authorization_code"
authorizationUrl: "https://github.com/login/oauth/authorize"
authorizationHeader: "token"
tokenUrl: "https://github.com/login/oauth/access_token"
userUrl: "https://api.github.com/user"
scope: ["user"]
auth {
provider = [local, oauth2]
[..]

oauth2 {
name: oauth2
clientId: "client-id"
clientSecret: "client-secret"
redirectUri: "http://localhost:9000/api/ssoLogin"
responseType: code
grantType: "authorization_code"
authorizationUrl: "https://github.com/login/oauth/authorize"
authorizationHeader: "token"
tokenUrl: "https://github.com/login/oauth/access_token"
userUrl: "https://api.github.com/user"
scope: ["user"]
}

[..]

}


Expand Down

0 comments on commit 10e1777

Please sign in to comment.