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 10e1777 commit 84f966b
Showing 1 changed file with 35 additions and 21 deletions.
56 changes: 35 additions & 21 deletions admin/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,28 +283,42 @@ Authenticate the user using an external OAuth2 authenticator server. The configu

##### Example

auth {
```
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"]
}

[..]

}
provider = [local, oauth2]
[..]
sso {
autocreate: false
autoupdate: false
mapper: "simple"
attributes {
login: "login"
name: "name"
roles: "role"
}
defaultRoles: ["read", "analyze"]
defaultOrganization: "demo"
}
oauth2 {
name: oauth2
clientId: "ed630d47c1863cf8fd02"
clientSecret: "31b14bff999b676844728e0b4405c95ff1923de3"
redirectUri: "http://localhost:9112/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"]
}
[..]
}
```


#### 3.2.1. Roles mappings
Expand Down

0 comments on commit 84f966b

Please sign in to comment.