| 50 | public profile: UserProfile = {} as UserProfile; |
| 51 | |
| 52 | public constructor(params: URLSearchParams) { |
| 53 | this.state = params.get("state"); |
| 54 | this.session_state = params.get("session_state"); |
| 55 | if (this.state) { |
| 56 | const splitState = decodeURIComponent(this.state).split(URL_STATE_DELIMITER); |
| 57 | this.state = splitState[0]; |
| 58 | if (splitState.length > 1) { |
| 59 | this.url_state = splitState.slice(1).join(URL_STATE_DELIMITER); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | this.error = params.get("error"); |
| 64 | this.error_description = params.get("error_description"); |
| 65 | this.error_uri = params.get("error_uri"); |
| 66 | |
| 67 | this.code = params.get("code"); |
| 68 | } |
| 69 | |
| 70 | public get expires_in(): number | undefined { |
| 71 | if (this.expires_at === undefined) { |