Class: AuthRocket::Realm

Inherits:
Resource
  • Object
show all
Defined in:
lib/authrocket/realm.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#access_token_minutesObject (readonly)

Returns the value of attribute access_token_minutes.



25
26
27
# File 'lib/authrocket/realm.rb', line 25

def access_token_minutes
  @access_token_minutes
end

#allowed_originsObject (readonly)

Returns the value of attribute allowed_origins.



23
24
25
# File 'lib/authrocket/realm.rb', line 23

def allowed_origins
  @allowed_origins
end

#available_localesObject (readonly)

Returns the value of attribute available_locales.



20
21
22
# File 'lib/authrocket/realm.rb', line 20

def available_locales
  @available_locales
end

#brandingObject (readonly)

Returns the value of attribute branding.



24
25
26
# File 'lib/authrocket/realm.rb', line 24

def branding
  @branding
end

#color_1Object (readonly)

Returns the value of attribute color_1.



24
25
26
# File 'lib/authrocket/realm.rb', line 24

def color_1
  @color_1
end

#customObject (readonly)

Returns the value of attribute custom.



19
20
21
# File 'lib/authrocket/realm.rb', line 19

def custom
  @custom
end

#email_verificationObject (readonly)

Returns the value of attribute email_verification.



21
22
23
# File 'lib/authrocket/realm.rb', line 21

def email_verification
  @email_verification
end

#environmentObject (readonly)

Returns the value of attribute environment.



19
20
21
# File 'lib/authrocket/realm.rb', line 19

def environment
  @environment
end

#jwt_algoObject (readonly)

Returns the value of attribute jwt_algo.



25
26
27
# File 'lib/authrocket/realm.rb', line 25

def jwt_algo
  @jwt_algo
end

#jwt_keyObject (readonly)

readonly



26
27
28
# File 'lib/authrocket/realm.rb', line 26

def jwt_key
  @jwt_key
end

#jwt_minutesObject (readonly)

Returns the value of attribute jwt_minutes.



25
26
27
# File 'lib/authrocket/realm.rb', line 25

def jwt_minutes
  @jwt_minutes
end

#jwt_scopesObject (readonly)

Returns the value of attribute jwt_scopes.



25
26
27
# File 'lib/authrocket/realm.rb', line 25

def jwt_scopes
  @jwt_scopes
end

#logoObject (readonly)

Returns the value of attribute logo.



24
25
26
# File 'lib/authrocket/realm.rb', line 24

def 
  @logo
end

#logo_iconObject (readonly)

Returns the value of attribute logo_icon.



24
25
26
# File 'lib/authrocket/realm.rb', line 24

def logo_icon
  @logo_icon
end

#nameObject (readonly)

Returns the value of attribute name.



19
20
21
# File 'lib/authrocket/realm.rb', line 19

def name
  @name
end

#name_fieldObject (readonly)

Returns the value of attribute name_field.



22
23
24
# File 'lib/authrocket/realm.rb', line 22

def name_field
  @name_field
end

#org_modeObject (readonly)

Returns the value of attribute org_mode.



21
22
23
# File 'lib/authrocket/realm.rb', line 21

def org_mode
  @org_mode
end

#org_name_fieldObject (readonly)

Returns the value of attribute org_name_field.



22
23
24
# File 'lib/authrocket/realm.rb', line 22

def org_name_field
  @org_name_field
end

#password_fieldObject (readonly)

Returns the value of attribute password_field.



22
23
24
# File 'lib/authrocket/realm.rb', line 22

def password_field
  @password_field
end

#privacy_policyObject (readonly)

Returns the value of attribute privacy_policy.



24
25
26
# File 'lib/authrocket/realm.rb', line 24

def privacy_policy
  @privacy_policy
end

#public_nameObject (readonly)

Returns the value of attribute public_name.



19
20
21
# File 'lib/authrocket/realm.rb', line 19

def public_name
  @public_name
end

#session_minutesObject (readonly)

Returns the value of attribute session_minutes.



25
26
27
# File 'lib/authrocket/realm.rb', line 25

def session_minutes
  @session_minutes
end

#signupObject (readonly)

Returns the value of attribute signup.



21
22
23
# File 'lib/authrocket/realm.rb', line 21

def 
  @signup
end

#stateObject (readonly)

Returns the value of attribute state.



19
20
21
# File 'lib/authrocket/realm.rb', line 19

def state
  @state
end

#stylesheetObject (readonly)

Returns the value of attribute stylesheet.



24
25
26
# File 'lib/authrocket/realm.rb', line 24

def stylesheet
  @stylesheet
end

#terms_of_serviceObject (readonly)

Returns the value of attribute terms_of_service.



24
25
26
# File 'lib/authrocket/realm.rb', line 24

def terms_of_service
  @terms_of_service
end

#username_fieldObject (readonly)

Returns the value of attribute username_field.



22
23
24
# File 'lib/authrocket/realm.rb', line 22

def username_field
  @username_field
end

Instance Method Details

#named_permissionsObject



29
30
31
32
# File 'lib/authrocket/realm.rb', line 29

def named_permissions
  reload unless @attribs[:named_permissions]
  @attribs[:named_permissions]
end

#reset!(params = {}) ⇒ Object



40
41
42
43
44
45
# File 'lib/authrocket/realm.rb', line 40

def reset!(params={})
  params = parse_request_params(params).reverse_merge credentials: api_creds
  parsed, _ = request(:post, "#{resource_path}/reset", params)
  load(parsed)
  errors.empty? ? self : false
end


34
35
36
37
# File 'lib/authrocket/realm.rb', line 34

def resource_links
  reload unless @attribs[:resource_links]
  @attribs[:resource_links]
end